//
// File:	Config.hpp
// Author:	Thomas TISSOT-DUPONT
// Login:	<thomas.tissotdupont@free.fr>
//
// Created:	17/04/2010 at 19:28:55
// Purpose:	
//
#ifndef CONFIG_HPP
#define CONFIG_HPP

#include "IConfig.hpp"
#include "Parser.hpp"

class Config : public IConfig, protected Parser
{
public:
	bool						ParseFromFile(const std::string &filePath);
	bool						WriteToFile(const std::string &filePath);

public:
	void						SetCvar(const std::string &key, const Variant &value);
	bool						HasCvar(const std::string &key) const;
	Variant						GetCvar(const std::string &key, const Variant &defaultValue = Variant()) const;

public:
	static std::string			GetConfigFilePath();

private:
	static const std::string	st_configNodeName;
};

#endif //!CONFIG_HPP
